//
//  Small_StandbyRight_04.swift
//  TimMusic
//
//  Created by nkl on 2024/10/29.
//

import Foundation
import SwiftUI

struct Small_StandbyRight_04: View {
    var model: ControlMusicModel
    @State var progress: Float = 0
    var body: some View {
        ZStack {
            Color.black.ignoresSafeArea()
            VStack {
                Image("ic_background_placeholder").resizable()
                TMText(title: "Ciema", font: 12, color: .white)
                TMText(title: "Harry Styles", font: 8, color: .white.opacity(0.8))
                Slider(value: $progress)

                HStack(spacing: 24) {
                    Image("ic_standby_last").resizable().frame(width: 24, height: 24)
                        .modifier(AppClickModifier(urlString: "timMusic://musicControl?option=\(OptionType.playlast.rawValue)", isStatic: model.isStatic))
                    if model.isPlay {
                        Image("ic_standby_pause").resizable().frame(width: 24, height: 24)
                            .modifier(AppClickModifier(urlString: "timMusic://musicControl?option=\(OptionType.pause.rawValue)", isStatic: model.isStatic))
                    } else {
                        Image("ic_standby_play").resizable().frame(width: 24, height: 24)
                            .modifier(AppClickModifier(urlString: "timMusic://musicControl?option=\(OptionType.play.rawValue)", isStatic: model.isStatic))
                    }
                    Image("ic_standby_next").resizable().frame(width: 24, height: 24)
                        .modifier(AppClickModifier(urlString: "timMusic://musicControl?option=\(OptionType.playnext.rawValue)", isStatic: model.isStatic))
                }
            }.padding()
        }
    }
}
